<template>
  <div class="base">
    <div class="hcqFont hcqStyle1">
      RobotsField
    </div>
    <div style="text-align: center;display: flex;
    justify-content: center;color: white;font-family:微软雅黑;cursor: default;">
      在线程序对抗平台
    </div>
    <div style="text-align: center;display: flex;
    justify-content: center;margin-top: 5px;">
      <div class="bg">
        <router-link to="/intr/" class="title">
          简介
        </router-link>
      </div>
      <div class="bg" v-if="!$store.state.User.isLogin">
        <router-link to="/login/" class="title">
          登录
        </router-link>
      </div>
      <div class="bg" v-if="!$store.state.User.isLogin">
        <router-link to="/register/" class="title">
          注册
        </router-link>
      </div>
      <div class="bg" v-else>
        <router-link to="/infoShow/" class="title">
          中心
        </router-link>
      </div>
    </div>
  </div>
</template>

<script>
import { useStore } from 'vuex';
export default {
  name: 'HomeView',
  components: {
  },
  setup() {
    const store = useStore();
    return {
      store,
    }
  }
}
</script>

<style scoped>
.base {
  text-align: center;
  height: 76vh;
  /* 竖向居中 */
}

.hcqFont {
  position: relative;
  letter-spacing: .07em;
  font-size: 3em;
  font-weight: normal;
  margin: 0 auto
}

.hcqFont:hover {
  cursor: default;
}

.hcqFont:before,
.hcqFont:after {
  position: absolute;
  top: 0;
  left: 0;
  right: 0
}

.title {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  color: white;
  cursor: pointer;
  text-decoration: none;
}

.bg {
  margin-left: 5px;
  position: relative;
  /* 使伪元素可以绝对定位 */
  display: inline-block;
  /* 使容器宽度适应内容 */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  font-size: 20px;
  color: white;
  cursor: pointer;
  height: 50%;
}

.bg::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 3px;
  background-color: rgb(128, 200, 248);
  width: 0;
  /* 初始宽度为0 */
  transition: width 0.5s ease;
  /* 只对宽度进行过渡动画 */
  overflow: hidden;
}

/* 鼠标悬浮时提示线宽度增长 */
.bg:hover::after {
  width: 100%;
  /* 鼠标悬浮时宽度增长到100% */
}

.hcqStyle1 {
  margin-top: 20vh;
  display: inline-block;
  font-weight: bold;
  color: #def;
  text-shadow: 0 0 1px currentColor, -1px -1px 1px #000, 0 -1px 1px #000, 1px -1px 1px #000, 1px 0 1px #000, 1px 1px 1px #000, 0 1px 1px #000, -1px 1px 1px #000, -1px 0 1px #000;
  -webkit-filter: url(#diff1);
  filter: url(#diff1);
  /*background:#def;padding:0 .2em*/
}

a {
  text-decoration: none;
  color: white;
}

a:visited {
  color: white;
  text-decoration: none;
}

a:hover {
  color: white;
  color: white;
}

a:active {
  color: white;
}

a:focus {
  outline: none;
}
</style>
